package com.jingdianjichi.subject.common.enums;

import lombok.Getter;

/**
 * 种类状态枚举类
 */
@Getter
public enum CategoryTyperEnum {

    PRIMARY(1,"已删除"),

    SECOND(0,"未删除");

    public int code;

    public String desc;

    CategoryTyperEnum(int code, String desc){
        this.code=code;
        this.desc=desc;
    }

    public static CategoryTyperEnum getByCode(int codeVal){
        for (CategoryTyperEnum resultCodeEnum: CategoryTyperEnum.values()){
            if (resultCodeEnum.code==codeVal){
                return resultCodeEnum;
            }
        }
        return null;
    }

}
